<?php
function the_servertime(){
?>
<span id="css_time_run">
<?=date("H:i:s")?>
</span>

<script type="text/javascript">
$(function(){


	var nowDateTime=new Date("<?=date("m/d/Y H:i:s")?>");
	var d=nowDateTime.getTime();
	var mkHour,mkMinute,mkSecond;
	 setInterval(function(){
		d=parseInt(d)+1000;
		var nowDateTime=new Date(d);
		mkHour=new String(nowDateTime.getHours());
		if(mkHour.length==1){
			mkHour="0"+mkHour;
		}
		mkMinute=new String(nowDateTime.getMinutes());
		if(mkMinute.length==1){
			mkMinute="0"+mkMinute;
		}
		mkSecond=new String(nowDateTime.getSeconds());
		if(mkSecond.length==1){
			mkSecond="0"+mkSecond;
		}
		var runDateTime=mkHour+":"+mkMinute+":"+mkSecond;
		$("#css_time_run").html(runDateTime);
	 },1000);


});
</script>
<?php
}
?>
